﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	x:Class="UI.MainPage"
    xmlns:tree="clr-namespace:UI"

	Width="960" Height="720">
    <UserControl.Resources>
        
        <sdk:HierarchicalDataTemplate x:Key="Building" ItemsSource="{Binding Floors}">
            <StackPanel Orientation="Horizontal">
                <TextBlock  Text="{Binding Name}" Tag="{Binding Image}"  MouseLeftButtonUp="TreeViewItem_MouseLeftButtonUp" />
            </StackPanel>
        </sdk:HierarchicalDataTemplate>
        <sdk:HierarchicalDataTemplate x:Key="Campus" ItemTemplate="{StaticResource Building}" ItemsSource="{Binding Buildings}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Name}"/>
             </StackPanel>
        </sdk:HierarchicalDataTemplate>
    </UserControl.Resources>
    
	<Grid x:Name="LayoutRoot" Background="White">
		<Border x:Name="header" Background="#2D2D2D" Height="40" VerticalAlignment="Top"/>
		<Border BorderBrush="#CCCCCC" BorderThickness="0,0,1,0" Background="#D3D3D3" HorizontalAlignment="Left" Margin="0,40" Width="250" Height="640">
			<StackPanel x:Name="side">
                <sdk:TreeView  x:Name="Tree" Height="580" BorderThickness="0" Background="transparent" Margin="0,0,0,20" ItemsSource="{Binding}" ItemTemplate="{StaticResource Campus}" >
				</sdk:TreeView>
				<Border x:Name="options" Visibility="Collapsed" BorderBrush="#2B4988" BorderThickness="1,1,1,0" Background="#3B5998" VerticalAlignment="Bottom" Height="40" Margin="0,0,-1,0" MouseLeftButtonUp="options_MouseLeftButtonUp" MouseLeftButtonDown="options_MouseLeftButtonDown" MouseEnter="options_MouseEnter" MouseLeave="options_MouseLeave">
					<TextBlock x:Name="addPrinter" Foreground="#CCCCCC" Text="+ Add Printer" FontSize="22" HorizontalAlignment="Center" VerticalAlignment="Center" />
				</Border>
			</StackPanel>
		</Border>
		<Border x:Name="footer" Background="#2D2D2D" Height="40" VerticalAlignment="Bottom" />
        <Image x:Name="bg" Margin="250,40,0,40" MouseLeftButtonDown="content_MouseLeftButtonDown" MouseMove="adding_MouseMove" MouseLeftButtonUp="adding_MouseLeftButtonUp"/>
        <Canvas  x:Name="content" Height="640" HorizontalAlignment="Left" Margin="250,40,0,0"  VerticalAlignment="Top" Width="710"/>
        
    </Grid>
</UserControl>